Skip to content

Fix stale scattergl error bars on legend toggle#7824

Merged
emilykl merged 2 commits into
plotly:masterfrom
JulienIcon:fix-scattergl-error-bars-visibility-mismatch
Jun 16, 2026
Merged

Fix stale scattergl error bars on legend toggle#7824
emilykl merged 2 commits into
plotly:masterfrom
JulienIcon:fix-scattergl-error-bars-visibility-mismatch

Conversation

@JulienIcon

Copy link
Copy Markdown
Contributor

Bug fix

Fixes #7773.

This PR fixes stale scattergl error bars after toggling trace visibility from the legend when only some traces have error bars.

regl-error2d keeps previous groups when batch entries are omitted, so hidden traces could leave stale error-bar groups behind. The fix sends explicit empty error-bar options for missing error_x / error_y entries, clearing the corresponding renderer groups.

Tests

Added a scattergl regression test covering mixed traces with and without error_y. The test verifies that after toggling visibility, the remaining visible error bars are as expected and that stale renderer groups are cleared.

Comment thread draftlogs/7773_fix.md Outdated

@emilykl emilykl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @JulienIcon for the fix, looks good!

@emilykl emilykl merged commit c8cccb0 into plotly:master Jun 16, 2026
240 of 242 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: scattergl error bars visibility mismatch

3 participants